@L|}6CD l0C)HCC WhL/h `CmCDiD`  R@W1  Y0@R !L` D  C D     )16CS S)  C)D1 p p 0 C9DI pCDL~CiCDiD` D  C D     )16CS S)  C)D1 p p }0 C9DI pCDL~CiCDiD` DD˙` d J)L !}D L(( LL()  L| L( S LH 0p n  } CY?  q  L L  ` )} `A! d߰")-݆ "  $G@LLL&0") $G% }H0 3S8`G ȱG ȱG   Gȭ Gȭ GG}GHiH8(()) G$H% `(0 })8` d)L ݆ & LGȘ ݆LL d  ! LL d)N>Q  HH) }  hyhyB q L> Lm JJ  Ln*` dB%' }8  H H` 1 { LL   !L     Hh SY?  q  1L }  !? S   q 1 L   Ll  Lg E`L   !L)  q 1L}) `L0AM݊L݉ ML  N݆LLLNLMLHG!@}1F GȱGLLEEȩÑEȑEEȑE Ed E7EȩE  q} L !,0,0SGɛ L 1 !L EHEh W G gLLSROTCES EERF } G) *Gȩ GȽG GȌd q q G`  8   0G  `D}CEDC0X:Ȣ Y ȱC* ? 0.. , 0%n ?A[ 0 : L`L  `, 0`Y}`piH n0)բY? 08`0 }  0$L GGȽG L `8L`L}8`  05G)݁,G)ȱGȱGHh0})Hh` B! 8`8iiiLE`}E8FEh( l0`ɃLL L8^~jj8jHi hEEEiEȱEiE` dTE} H8EEȱEEȩEh J E8   . m  i`LI!)E1FR}1LJ舩9GIH`LJJ`HGHh l`} S gL   8 rii `дCDCG W  }C  Lq` X٨`DOS SYS IIIIIIIIIIIIIIIC`0 ߩ0}}} HE ||||DDOS DOSDOS SYS }}}}CDOS SYS} 0`BDELV !B }`LVUQ   ]   TU J ]L!T  #      TU  } L ? .  t`GBJ V~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI   0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$} V0 0`B;DELV䌚 !B y`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J V (` 9 V⪍ ઍ  -'}LLu DEHILV 9 .l 9 .l  `` s$B VBH(}I|DE V BLV nB,DE J V* \*` B V BLVDEHI BLVL)}1u H232435; 1 ;  hh@2 e1i1LHҍ 00) 08 109hh@ Ҡ2e*}1i1232435ޥ<<87} 3E:}DISK OPERATING SYSTEM II VERSION 2.0SCOPYRIGHT 1980 ATARIA. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDGE J. D,}UPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRESSF. LOCK F-}ILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES9!&x#!7&p))'&X*./)L''-؆莟.}R'S  vW DEHHI 1A#! @ ~0ɛ8A0.) ȅ 1 1i/}il ! 1L NO SUCH ITEMSELECT ITEM OR FOR MENU! 0 .{z:*{}.|~ 1 0 00}JB 18L^%|DLl%DIRECTORY--SEARCH SPEC,LIST FILE? # 0 0 n&|D! 1L NOT A DISK FILE1}N !B 1L " 1 !BDED:}:1BJ|DE 1DEBH2}I 1 h0ߢ 0.  0?詛 1 ~0YЛ 1 "L<" "L 3} BL1TYPE "Y" TO DELETE...DELETE FILE SPECCOPY--FROM, TO?OPTION NOT ALLOWED COPYING---DN:4}# 0|D .L$A#B#C#JB|DE 1BHIDD#E 1D#0: B5} 1L B#C#C#B# B 1N#$0SYS1}:e#D# d# D# .d#ȽD# d# 𩛙d#X# 1,A#6}PdD#ELO- A.BJdD#E 1 1HH 0hh|DL^%1}:e# Lt% e#dD#EL%7} 1 0 . .0% 1L WILD CARDS NOT ALLOWED IN DESTINATION 0 A.|K@C}//3Hu ξL/L DRIVE TO WRITE DOS FILES TO?WRITING NEW DOS FILESTYPE "Y" TO WRITE DOS TO DRIVE 1.?}D1:DOS.SYSERROR - NOT VERSION 2 FORMAT. , &* բ( 1L `[) 0NΞ 0 L1M) 1@} L BAD LOAD FILELOAD FROM WHAT FILE?) 0 0#B 1L WHAT FILE TO LOCK?) 0 0$B 1L WHAT FILE TO UNLOCK?DUA}P DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO USE PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV. h  ,B}  `)  <0 2 2 0  ,   ,,ޢ* 1L ,K* 1 ~0 0C}FINSERT BOTH DISKS, TYPE RETURNERROR - DRIVES INCOMPATIBLE., 1 ~038  , 1L D}, &*  Lz+, 0 , 1 ~0 + Y,0!,0 ,L+ ,mm  v,"ǭE}0Ξ, 05,Lt+L +,Hh` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNF}INSERT DESTINATION DISK,TYPE RETURN`    `L,8,0( rG}L1(`ߢ) 1* 1 ~0Y`hhL S SL1) 8`NAME OF FILE TO MOVE?- 0 0|DLtH}% A., 1 <0 0 .@L# .BJ 1  DEHIB V L1 ,5 1 <0,L. I} JB|,A#Pd#DE 1 HI BDEHHII 1 B 1 , 1 <0,0Lf- B VJ},A#P, 1 <0 0L#L ߢ) 1* 1 ~0Yj383}mm ݭK}}`8}``|* ? ɛ,`|:(|/ 1L `DESTINATION CANT L}BE DOS.SYS0 0H{ $22Δ $28/L /) $2 Π $2 0 ξM}hAΞB,0 J 1 BޝDEHI,HDE 1HIHIDELSAVE-N}GIVE FILE,START,END(,INIT,RUN)O X0 1`BDEPHI V` X0H 1 L O}0 0 1L0`PLEASE TYPE 1 LETTER,0`hhL <0 1L0LA1 ,;ɛ7,"ɛ:ݦ1ݥP}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{Q}NAME TOO LONG B VL ` L1I H1EӝDL1|mDiE` V0`8d/8 i:"2!22 1R} L ERROR- 165ɛ+,' 20*.. өw2 1``2TOO MANY DIGITSINVALIDS} HEXADECIMAL PARAMETER800 0 8 00`,0'D800H,ɛh`2L1NEED D1 THRU D4uT} HEXADECIMAL PARAMETER800 0 8 00`,0'D800H,ɛh`2L1NEED D1 THRU D4uTHE DRAGON'S TAIL part II This documentation may not be copied, photocopied, reproduced, translated, or telecommunicateV}d in any form, in whole or in part, without the prior written consent of Antic Publishing, Inc.The accompanying program matW}erial may not be duplicated, in whole or in part, for any purpose. No copies of the floppy disk(s) may be sold or given to aX}ny person or other entity.Notwithstanding the above, the documentation and accompanying disk(s) may be duplicated for the sY}ole use of the original purchaser.Antic is a trademark of Antic Publishing, Inc.THE DRAGON'S TAIL, by Ed Churnside.VolumZ}e Two - Graphics.1. OVERVIEW.The first volume contains 13 machine code subroutines supported by the BUILDER program, which[} are documented here as part of the graphics disk. These routines fall into three categories. The screen loader routines (SCR\}LD1-4, and PADLD) are used to insert the pictures you create into your own programs. The screen editing routines (CONVH, JUST]}SCR, OVLAY, FILL, REPCOL, SCRBU and SWAP) perform powerful and unique screen editing functions, to enable you to design your ^}own utilities and for unusual special effects. The routine GRA15, allows owners of the older 800 series to access the graphic_}s 15 mode, available on the newer machines.This disk contains five Basic programs. AUTORUN.BAS runs TAIL2MEN.BAS which is s`}imilar to the menu on the first volume. EDITOR.BAS is a programmable screen editing utility. MAPPER.BAS allows you to build sa}ymbol maps for use with the editor. CONVERT.BAS allows you to convert pictures from most of the common drawing packages to cob}mpressed format. DEMO.BAS is a short animated title screen, built using the editor, which gives you some idea of what the proc}gram can do. The disk also contains all the set up screens, maps and editor programs used to create the DEMO sequence.This d}is the reference document for all these programs, but you will probably have to work your way through the tutorial on the thie}rd disk before you can make much sense of the EDITOR program. This an extremely powerful program, which is easy to use, but sf}ome of the underlying concepts are unusual, and it will take you a while to become familiar with its use.PLEASE NOTE: The Ag}UTORUN.SYS on this disk, differs from the one on the first disk, in that it contains no buffer space. This is because the EDIh}TOR program uses every available scrap of memory. The two are for the most part exchangable, but the first one will not work i}with the EDITOR, and this one will not work with AFRICA.1.1 Drawing Programs.The EDITOR program works in graphics 1-7. j}Athough the EDITOR has the ability to draw screens, these features are intended for use in animation and touch up. You will pk}robably want a drawing program too. There are no programs I know of that draw in the lower graphics modes, but the EDITOR prol}gram allows you to draw in graphics 7 and convert your picture into a lower mode.There are 4 common graphics 7 drawing packm}ages, Paint, Drawit, Movie Maker (Background) and Rembrant (Mode 0). Movie Maker background pictures are supported by the CONn}VERT program. I am unfamiliar with this package and can make no comments on it. Paint and Drawit are directly supported by tho}e EDITOR. The screens on this disk were drawn using Paint by ATARI and DRAWIT by ANTIC.Paint is by far the easiest to use dp}rawing program available for the ATARI. Several different brushes, textures and extensive fill commands make it a pleasure toq} use. You will never regret buying this program especially if you have young children. However, it is becoming increasingly dr}ifficult to find.DRAWIT has several features that Paint does not have, including full screens (Paint pictures always have as} text window), XY coordinates for drawing from graph paper sketches, and 9 viewing areas, which really help when preparing ant}imations. For serious work such as long animations these features are important, but it isn't as smooth and friendly as Paintu}. At the moment, Drawit is still available from ANTIC.REMBRANT by ANTIC, has virtually every feature you could ever want frv}om a drawing package. Although it has only one viewing area, it allows you to animate small windows on the screen, which helpw}s with animation. It shows the X,Y coordinates and can draw full screens. It can be used with a joystick or a touch pad, the x}other packages are joystick only. It has many features that are totally unique, far too many to describe here. It also allowsy} you to draw in the GTIA modes graphics 9, 10 and 11, and the hi res 4 color mode, Graphics 15 (160*192 pixels). It is freelyz} available and probably the best value for money, but it is slightly more complicated to use than the others, and it can only{} save 10 pictures per disk. Rembrant has a converter which will allow you to transfer pictures to other formats, and is suppo|}rted by the CONVERT program on this disk.Because of the large amounts of memory used, graphics modes greater than 7 are n}}ot that useful, and are not directly supported by the EDITOR. There are however 2 common graphics 15 drawing programs support~}ed by the converter, and the SCRLD/compression system supports all available graphics modes.Micropainter was one of the fir}st Drawing programs for the Atari and there are a lot of copies out there somewhere. Its file format is used by many public d}omain and magazine published programs and is to some extent regarded as standard. It has been many years since I used it, so }I cannot comment on it further.Micro Illustrator is the software used by the Atari Touch Tablet and the Koala Pad. This is }a fine piece of software, friendly and easy to use. It stores its pictures in a compressed format which uses a byte counting }system similar to the SCRLD compressor. SCRLD will usually produce slightly better compression, but some pictures will compre}ss significantly better using the Micro Illustrator method. The routine PADLD will allow you to use these pictures in your pr}ograms without conversion and it is supported by the CONVERT program.1.2 Word Processor.The EDITOR also has the ability} to build text files. This is intended for use building short work macros. For longer EDITOR programs, you will probably want} to use a word processor. Any word processor that supports ASCII files will do. MEDIT is excellent and my preffered choice, b}ut ATARIWRITER, HOMEWORD, PAPER CLIP, and a whole slew of others can also be used.1.3 Disk Requirements.Disk space beco}mes very important when working with longer animations. Both DOS 2.5 and a second disk drive come in very handy, although the}y are not strictly necessary. The best way to set up your disks is:1) EDITOR disk containing AUTORUN.SYS, DT1.OBJ, GF.OBJ,} EDITOR.BAS (as AUTORUN.BAS), SCRNHELP.FIL, SCRNCHAR.MAP and your symbol maps, screens and editor programs. The version of DO}S on your editor disk must be able to have 5 files open at the same time. To do this POKE 1801,5 from Basic, and save this ve}rsion of DOS to your disk. (This works with the three versions of DOS that I use.)2) MAPPER disk containing AUTORUN.SYS, DT}1.OBJ, MAPPER.BAS (as AUTORUN.BAS) and your symbol tables.Owners of two drives should use one disk for each major project t}hat contains all screens, maps and programs for that project and keep it in drive two.oduced, translated, or telecommunicateW2. SOME BASIC CONCEPTS.When you issue a graphics command from Basic, it sets up two vectors to point to the screen. SAVM }SC at $58-59 (88-89) points to the top left hand corner of the graphics screen and TXTMSC $294-295 (660-661) points to the to }p left hand corner of the text window. The memory between SAVMSC and TXTMSC is the graphics screen. All the routines use thes }e vectors to find and process the screen memory. BASIC only uses these addresses when you write to the screen via print, plot } ect. ANTIC the chip which actually displays your screen does not use these vectors. Thus you can alter these vectors tempora }rily in your programs to get the routines to process memory other than the currently displayed screen. This can be useful whe }n processing with multiple screen areas, or using custom display lists. It is worth noting that there is always a full screen } of memory reserved, even if the graphics mode you are using has a text window, and that TXTMSC is always set up, even if the } screen does not have a text window.Although I talk about graphics 0-7, the routines will work just as well in graphics 0-1 }5 +16 and/or +32. All the graphics modes available on your computer are fully supported by the routines, but only graphics 1- }7 are supported by the EDITOR. This is because the EDITOR requires 2 buffers the size of the screen in addition to the screen } memory. A graphics 8 screen is 7680 bytes long, 3*7680 or 23040 bytes would not leave much room for a program. A graphics 0 }screen does not set up TXTMSC, nor does it compress particularly well. You are usually better off handling a graphics 0 scree }n via Basic Print statements. Other graphics and Antic modes only work on newer machines, and custom graphic modes can be han }dled by setting SAVMSC and TXTMSC yourself.The nine 1 byte color registers start at location $2C0 (704) usually called PCOL }R0. BOTSCR at $2BF (703) shows the number of text rows available for printing, usually 24, 4 or 0.In the examples that foll }ow, I assume that the basic variables SAVMSC and TXTMSC have been set up with the contents of their respective vectors. I als }o use the routine MOVE from the first volume of the Library.Each point on the screen is called a pixel. The number of pix }els displayed varies with graphics mode. There are three main formats of screen memory you will need to know. In a four color } graphics screen, each pixel has a value from 0-3 stored in two bits. Thus there are four pixels in each byte of screen memor }y. i.e. A graphics 7 screen has 160 pixels per line or 40 bytes, the screen is 96 lines long, so screen memory is 96*40 or 38 }40 bytes.In a two color screen, each pixel has a value of 0 or 1 stored in a single bit. Thus there are 8 pixels per byte o }f screen memory. So a graphics 6 screen which has 160 pixels per line, uses 20 bytes per line and screen memory is 96*20 or 1 }920 bytes long.In the text screens, Graphics 1 and 2, a pixel, is a character and occupies a full byte. So graphics 2 which } is 20*12 or 240 characters, is also 240 bytes long.The descriptions and examples that follow all require you to have a goo }d understanding of screen graphics and memory organisation on your Atari. Perhaps you would like to reread the appropriate se }ctions of your Basic manual, or graphics primer at this time, before you read any further.Atari Basic has two ways of ref }erring to its color registers, there is the number that you use on a COLOR command which is 0-3 (normally) and 0 is backgroun }d and the number that you use on a SETCOLOR command which is 0-4 and 4 is background. When you are working in machine code or } poking the registers directly, the SETCOLOR numbers make a certain amount of sense, but having two possible numbering scheme }s is a great way to cause unnecessary confusion. All the routines in this library, the EDITOR program, and the drawing progra }ms reviewed use the COLOR command numbering system. Some graphics modes also use the player missile color registers, the EDIT }OR refers to these registers as color 5-8.0 - Background and area around screen.1 - Forground color 1.2 - Forground color } 2 and luminosity of characters in text window.3 - Foreground color 3 and Color of Text Window.4 - Forground color 4, used }in text graphics.5 - Player missile 1 color.6 - Player missile 2 color.7 - Player missile 3 color.8 - Player missile 4 co }lor. SOME BASIC CONCEPTS.When you issue a graphics command from Basic, it sets up two vectors to point to the screen. SAVM 3. THE ROUTINES.All the rules described in the first section, apply to these routines.3.1 AUTORUN.SYSThe AUTORUN.SYS} is exactly the same as the one on the first volume, except that it does not contain any buffer space.3.2 QLOAD.The QLOA}D routine is also part of this AUTORUN.SYS.3.3 CONVH - Convert 4 color screen to 2 colors. RC=USR(CONVH,BUF,LEN)BU}F is the address of a buffer and LEN is its length. Call this routine with a graphics 7 screen displayed and a 1920 byte buff}er. The routine will build a graphics 6 screen in the buffer, ready to be displayed. Colors 0 and 2 will be background, color}s 1 and 3 will become forground in the 2 color graphics 6 display. Start with a graphics 5 screen and use a 480 byte buffer t}o convert to graphics 4. The graphics 4 and 6 screens are half as long as their four color counterparts, hence the name, CONV}H - CONVert Half.There are no commercially available drawing programs that I know of, that allow you to draw in the 2 color} modes, but the modes exist, and they use a lot less memory and disk space than there four color counterparts. With CONVH you} simply draw them in graphics 7 using only colors 0 and 1 and convert them. There is no way to convert a 2 color screen back }into a four color screen, I wouldn't know what colors to use, so do not delete your four color version until you are absolute}ly sure the screen is finished. Even then it is not a good idea!e.g To convert a graphics 7 screen to graphics 6 and displa}y it.500 REM 7 TO 6510 A=USR(CONVH,BUF,1920)520 A=USR(MOVE,704,CBUF,9)530 GRAPHICS 6:SAVMSC=PEEK(88)+256*PEEK(89)540 A}=USR(MOVE,CBUF,704,9)550 A=USR(MOVE,BUF,SAVMSC,1920)560 RETURN3.4 FILL - Fill an image with a background picture. } RC=USR(FILL,BUF,LEN)Suppose you had a picture of a nice landscape, trees, meadows, a hill or two and you wanted to superim}pose various figures on this picture. You could create multiple copies of the picture, and draw in your figures. What if it w}as for an animation and you wanted to have the figure walk accross the screen. Now you need hundreds of copies.Instead you }could draw the figures onto a blank background. Put the picture into a buffer, load the forground image onto the screen and c}all FILL. FILL replaces every pixel on the screen that contains background (color 0) with the respective pixel from the buffe}r. This implies that your figures cannot contain background, or it will be filled too! This is part of the technique I call o}verlays, which is explained fully in the tutorial.3.5 GRA15 - Display Graphics 15 mode. RC=USR(GRA15)The newer m}achines, most XLs and XEs support graphics 15. This is a 4 color hi-res mode 160*192 pixels. The problem is that the older 40}0 and 800 computers don't support this mode from Basic. If you have an older computer or are writing publishable software tha}t may be run on an older computer, you will find this routine useful.This routine makes use of two happy coincidences.1. }A graphics 15 screen has the same number of bytes and lines as graphics 8.2. A graphics 15 screen has the same number of by}tes per line as graphics 7, but twice as many lines.To use the routine, issue a graphics 8 (+16) command, then call the rou}tine. It will modify the graphics 8 display list to give you a graphics 15 display and it will tell Basic that you are in gra}phics 7. This will allow Basic to Print and Plot and Draw on the top half of the screen, just as if it were a graphics 7 scre}en. To draw on the bottom half of the screen just modify SAVMSC. POKE 89,PEEK(89)+15 will change all draw commands to the bot}tom half of the screen.When using this with SCRLD/SCRBU make sure that SAVMSC has its original value before calling, and do}n't issue a graphics 15 command withing the saved screen. Call GRA15 before calling SCRLD instead.3.6 JUSTSCR - Justify S}creen Horizontally. RC=USR(JUSTSCR,BITS,XLEN,SCRLEN)Moving a screen full of data up or down is relatively easy, using} only the MOVE command from the TEXT Disk. This is because you are always moving a whole number of bytes. Moving the screen h}orizontally is a pain, because a pixel is usually not a full byte. The JUSTSCR routine will move a screen any number of BITS }to the right. BITS is the number of bits to move, XLEN is the number of BYTES in a line and SCRLEN is the length of the scree}n.Note: This routine moves in BITS, to move in pixels, you must multiply the number of pixels to move, by the number of bit}s in a pixel. This is 8 for a Character, 2 for a four color screen and 1 for a two color screen.e.g. To move a Graphics 7 }screen, 10 pixels to the right.500 A=USR(JUSTSCR,20,40,3840)e.g To move a Graphics 6 screen, 10 pixels to the right.50}0 A=USR(JUSTSCR,10,20,1920)e.g. To move a Graphics 2 screen, 10 pixels to the right.500 A=USR(JUSTSCR,80,20,240)e.g. }To move a Graphics 7 screen, 10 pixels to the left.500 A=USR(JUSTSCR,(160-10)*2,40,3840)3.1 AUTORUN.SYSThe AUTORUN.SYS[3.7 OVLAY - Remove a background from a picture. RC=USR(OVLAY,BUF,LEN)Remember the FILL routine. This routine is al}most the exact opposite. It replaces every BYTE (not pixel) in the current screen that is the same as the screen in the buffe}r with background (Color 0). This is very inportant in the use of overlays, which work on a byte by byte level. Overlays are }explained in the tutorial.3.8 PADLD - Load Touch Tablet or Koala (Micro Illustrator) Screens. RC=USR(PADLD,FNAME,BUF},LEN)This routine loads a screen saved in Micro Illustrator format. It does not issue an internal Graphics command so you m}ust issue it yourself. This would be via a Graphics 15 statement or a call to GRA15.e.g. To load a screen on an 800 compute}r.200 DIM F$(15),BUF$(3000)210 F$="D1:PICTURE.MIL"220 GR. 8+16:A=USR(GRA15)230 A=USR(PADLD,ADR(F$),ADR(BUF$),3000)On a} XL or XE then line 220 could simply be:220 GR. 15+163.9 REPCOL - Replace one color register with another. RC=USR}(REPCOL,TOREG,WITHREG,LEN)This routine replaces every occurence of TOREG with WITHREG for a length of LEN. Guess what this }routine is used for? If you said overlays you would be right.e.g. To replace every occurence of color register 1 on a GRAP}HICS 7 screen with color register 3.500 A=USR(REPCOL,1,3,3840)3.8 SCRBU - Backup a screen in compressed format. R}C=USR(SCRBU,IOCB,BUF,LEN)This routine will write the current screen information to a file in compressed format. The IOCB mu}st be opened and closed by the Basic program, which may also write other information to the file. A file that contains multip}le screens of information is usually called an animation file. The BUFfer and its LENth are not really important, they are ju}st used as a work area by the routine. The longer the buffer, the faster the routine will work. A buffer of 1K to 3K will be }fine. This routine may return normal I/O errors in ERRSAVE.Note. This routine only writes the screen data, NOT the Color Re}gisters, NOT the Graphics Mode, only the screen.e.g. To write a graphics 7 screen to a file using a 1K buffer.500 OPEN #}1,4,0,"D:MYPIC.SCR"510 RC=USR(SCRBU,1,BUF,1024)520 CLOSE #13.10 SCRLD(1-4) Load a compressed screen or animation file} A=USR(SCRLD1,FNAME,BUF,LEN)FNAME is the address of a string containing the filename. BUF is the address of a buffer of} length LEN. The effect of different buffer lengths is discussed in the tutorial.A compressed file contains commands and da}ta, something like a simple program. A call to SCRLD reads the entire file and executes all the commands it finds on the file}. If it finds something it doesn't like it returns error 21, it can also return normal I/O errors.The 4 SCRLD routines, SCR}LD1, SCRLD2, SCRLD3 and SCRLD4 differ in their length, and in the commands they support. SCRLD1 supports the basic functions }needed for simple or static screens. SCRLD2 supports simple animation. SCRLD3 supports complex animation. SCRLD4 supports com}plex animation and the routines for interfacing with assembler special effects and interrupts. Always use the version of SCRL}D that has the minimum amount of functions that you need. If SCRLD encounters a command that is supported by a higher version}, it bypasses that command and continues processing.You do not really need to know the command structure of a file, unless }you are using the advanced functions, but in the interest of completeness, I am going to give a command breakdown here.is alxSCRLD1 - Simple Screens.Cmd Function Bytes Description 0 Graphics 1 Basic Graphics Mode 1 Lo}ad 9 Regs 9 Color Registers 2 Load 5 Regs 5 Color Registers 3 Load Screen Varies Old Format Compr}essed Screen15 Load Screen Varies New Format Compressed Screen155 NOP (do nothing) 0SCRLD2 - Simple Animation.I}n addition to all the commands of SCRLD1:Cmd Function Bytes Description 4 Loop 1 Number of loo}ps 5 End Loop 0 6 Wait Jiffies 1 Number of Jiffies 7 Wait Seconds 1 Number of Seconds 8 So}und 4 Reg, Freq, Dist, VolSCRLD3 - Complex Animation.In Addition to all the commands of SCRLD1 and SCRLD2}:Cmd Function Bytes Description 9 Poke 3 Address, Value10 Double Poke 4 Address, V}alue11 Increment 2 Address12 Decrement 2 AddressSCRLD4 - Interface to Assembler.In addition }to all the prior commands:Cmd Function Bytes Description13 Pause 2 Address14 JSR } 2 AddressTo fully understand the prior tables it is necessary to follow the SCRLD Process. Once the buffer is loade}d, SCRLD looks at the first byte, it knows this byte has to be a command. Say the byte was a zero, a graphics command. It the}n looks at the second byte to see what graphics mode, say the byte was a 7. Then SCRLD issues a GRAPHICS 7 command, and looks} in the next byte for the next command. SCRLD always knows whether it is expecting a command or parameters, and so a file can} be expanded.Most of the commands are pretty obvious, but some may need further explanation. Only advanced programmers are }likely to use these commands. A 155 or NOP does nothing, this can be useful when you make a minor mistake building a file, su}ch as writing one too many end loops. You can use a disk editor to find the offending command, and write a 155 over it. This }can be much quicker than rebuilding the file. Another use is leaving a blank space to patch in commands later.Poke and DPOK }E are useful for setting switches for Basic to check, or for updating hardware registers directly. Increment and decrement, a }dd or subtract one from an address. They are useful within loops for changing sound or color registers to produce special eff }ects. One interesting use of these commands is changing SAVMSC and Loading a screen. This can produce horizontal or vertical  }motion very economically, but you really need a good understanding of what is going on to use them this way.Pause is for us }e with interrupts. If you have a vertical blank interupt running that produces player missile enhancements to a screen, you c}ould use poke to tell the interrupt to do its thing and pause to wait until it is finished. Pause will wait until the address} specified is zero. All addresses are specified in Low Byte/High byte format, in standard 6502 usage.JSR or Jump Subroutine} issues a 6502 JSR to the specified address. Your routine shoud end by issuing a RTS. This ability to call a user written sub}routine allows you to program stunning special effects and integrate them with the SCRLD process. You are responsible for sav}ing the X and Y registers, and restoring them before you return.For those who are interested I am now going to describe e}xactly what a compressed screen looks like. There is absolutely no reason why you should know this since SCRLD and SCRBU do a}ll the work for you, but I know that some of you will be curious.The first byte of a compressed screen is a 15 or load comp}ressed command. This is followed by a 2 byte offset which is added to SAVMSC before the expansion starts. This means that no }matter how many bytes of background start a screen, only 2 bytes are used.SCRLD then expects to see a number of pairs of by}tes: Number, Value, Number, Value, and so on. The Value is the value of the byte to be plotted and the number is the number o}f times it occurs. For instance, if your screen contained 400 contiguous pixels of blue sky plotted in register 1. This would} be 100 bytes of $99 (binary 01010101). This would be $64 $99 as screen load sees it. 100 pixels reduced to 2 bytes, this is }why it is a compressed screen.When the screen is highly detailed no two adjacent bytes are the same, which would give terri}ble compression, something like $01 $9B $01 $9D $01 $45 and so on. Two bytes to represent one. SCRLD does NOT do this. It cal}ls this single byte mode. A zero in the Number position cannot validly occur so it uses this as an indicator. It writes a 0 f}ollowed by the number of single bytes, followed by the bytes themselves. The sequence shown above would become $00 $03 $9B $9}D $45, saving a byte. It can save up to 255 bytes of detail this way with an overhead of only 2 bytes. SCRBU will not switch }back to compressed mode till it finds a byte occuring 3 or more times, since an occurence of two bytes takes the same space i }n either mode.In this way SCRBU makes the most of its compressable data and minimises the loss on detail. A Number value of!} 0 followed by 0 number of single bytes can also not validly occur, so SCRBU uses this to mark the end of the compressed scre"}en data. Any number of bytes of background at the bottom of the screen are not saved.i.e. A GRAPHICS 7 screen that had 4 fu#}ll lines of blue at the top, plotted in register 1, and was otherwide blank. When saved with the S C command in the editor it$} would look like this.$00 $07 (Graphics Command)$01 $?? $?? $?? $?? $?? $?? $?? $?? $?? (Load 9 Regs)$0F $00 $00 $A0 $9%}9 $00 $0019 bytes in all. The old 3 format is the same, but does not have an offset. 1 Basic Graphics Mode 1 LoW3.11 SWAP - Exchange color registers. A=USR(SWAP,REG1,REG2)SWAP exchanges two color registers. The values in the regi'}sters are exchanged, and everywhare on the screen that contains one register, is replaced by the other. After a call to SWAP (}the screen looks exactly the same but the background and text window may have changed.e.g. To swap registers 1 and 3.500 )}A=USR(SWAP,1,3)3.12 Quick Reference Summary.In Alphabetical order by routine. USR(CONVH,BUF,LEN) USR(FIL*}L,BUF,LEN) USR(GRA15) USR(JUSTSCR,BITS,XLEN,SCRLEN) USR(OVLAY,BUF,LEN) USR(PADLD,FSPEC,BUF,LEN) +} USR(QLOAD,FSPEC,ADDR[,LEN]) USR(REPCO,TOREG,WITHREG,LEN) USR(SCRBU,IOCB,BUF,LEN) USE(SCRLD1,FSPEC,,}BUF,LEN) USE(SCRLD2,FSPEC,BUF,LEN) USE(SCRLD3,FSPEC,BUF,LEN) USE(SCRLD4,FSPEC,BUF,LEN) USR(SWAP,R-}EG1,REG2)4. THE PROGRAMS.There are five programs included on this disk for your use and entertainment. All but one of .}these programs use the TAIL routines. This section discusses how to use the programs and introduces some concepts for your co/}nsideration. This section does not go into any detail about how the programs work. The programs are all clearly written and c0}ommented. If you want to know more about how any of the programs work, simply list them. However, shortage of memory has caus1}ed the editor program to be compressed, using many space saving techniques. Although the structure is fairly clear and functi2}onal, this is not an easy program to understand.4.1 AUTORUN.BAS - Loader Program.The AUTORUN.SYS file automatically run3}s any program on the disk called AUTORUN.BAS. This can be any Basic program you like. Normally I use a one line program that 4}runs the real program. The AUTORUN.BAS program on this disk is:100 RUN "D1:TAIL2MEN.BAS"4.2 TAIL2MEN.BAS - Disk Menu.T5}his program is just a simple menu to give you easy access to the other programs on the disk. This program is very similar the6} the menu on the first volume.4.3 CONVERT.BAS - Convert to Compressed Format.This menu driven program can read files in7} most of the common formats and save them in compressed format. Paint, Drawit, Micro Illustrator, Micro Painter, Movie Maker 8}Background and Rembrant are supported. It also allows a disk directory, and has a fix function for the early Reston version o9}f Paint. Please bear in mind that Rembrant does not use normal DOS and the directory will not work on it. Reston versions of :}Paint have a non standard directory, and the fix function is needed to make these pictures DOS accessable. Read up on the FIX;} function of the EDITOR for a fuller description before you use this function. IF YOU DO NOT HAVE pAINT BY RESTON, DO NOT USE<} THIS FUNCTION, IT WILL DESTROY YOUR DISK. Disable it by deleting the R from the D$="......" statement near line 1100.When =}you run CONVERT, it asks you to chose an input format and asks for a file name when approprate. When entering file names, the>} extender will default depending on the type of file, using the extenders documented at the beginning of the reference guide.?} Rembrant pictures don't have file names, but it will ask for the Rembrant mode (0-4) the picture was drawn in. Then it loads@} the picture from disk. The picture is visible for a few seconds so you can view it. The program then asks you for the save oA}ptions. Pictures can be saved with or without an embedded graphics command, and with either no, 5 or all 9 color registers.B}Please bear in mind that Rembrant modes 1,2 and 3, which correspond to Graphics 9, 10 and 11, cannot have text windows, and MC}ode 2 (graphics 9) uses all nine color registers. Also remember that the Hi-res 4 color mode, Graphics 15, (Micro IllustratorD}, Micro Painter and Rembrant mode 4) are not supported by the operating system on the old 400/800 computers. You should not eE}mbed a graphics command if you intend to load these pictures on older computers, you should call the GRA15 routine yourself iF}nstead.P - Exchange color registers. A=USR(SWAP,REG1,REG2)SWAP exchanges two color registers. The values in the regi4.4 EDITOR.BAS - The Editor.If you have already worked your way through the tutorial then you know what the editor can d!H}o. If not then go and do so now. The program loads a default map of SCRNCHAR.MAP if there is one on the disk at load time. Th!I}en it runs a program called AUTORUN.PGM if it finds one on the disk. This is useful for changing the defaults. The following !J}is a full definition of ALL the editor commands.? - Directory.? [drive] [filename]Used to provide a disk directory of t!K}he current file. When drive is not specified it defaults to the Input drive.e.g.? 1? TEST*.*? 2 *.SCR* Comment.Use!L}d to document your editor programs." - Ditto.Will repeat any command except a Run.A - Alter Extender.A [type [exte!M}nder]]Used to alter the default extenders in the editor. When used without any parameters it displays the current settings !N}in the Last Command Line. Type can be C compressed, D drawit, P Paint, R Runable programs or U User maps.e.g.A C TSTA R!O}B - BeginB type filenameThis command starts building an animation or macro. Type can be A for animation or M for macro.!P}e.g.B A TESTB M WORKC - Color.C valueC reg,col,lumThe first format is used for setting values in the internal co!Q}lor register. This value is used like COLOR in the drawing commands, it is used as the spacing between characters in the Inse!R}rt Character command and as an offset in the Insert String command. Please consult your Basic manual for the correct offset v!S}alues.The second format is used to change the colors displayed on the screen. It is similar to the SETCOLOR command except !T}that background is register 0, not 4.e.g.C 1C 3 9 4D - Define.D type valueD S xloc,ylocThe first format is used!U} to change some of the editor defaults. D I will change the Input drive, D O will change the Output drive and D B will change!V} both drives. D C will change the format of the color line. D C 1 shows 4 playfield colors in text format, D C 2 shows 5 play!W}field colors in numeric format and D C 3 shows all nine registers in Hex.D S or Define Symbol creates a 1 character map of !X}symbol $. The character is a rectangle from the current cursor position to the xloc,yloc specified.e.g.D I 8D C 3D S 20!Y} 20E - Exchange color.E reg1 reg2 [R]When R is not specified this command exchanges which registers are used to plot w!Z}hich colors, leaving the screen unchanged. It's most common use is to change the text window and background colors.When R-R![}eplace is specified then all occurences of register 1 are replaced by register 2. This is used to purge a register from the s!\}creen. Its most common use is to change the colors of the default character set.e.g.E 1 3E 2 3 RF - Fix Disk.F typ!]}ePaint is now published by ATARI but it was originally published by RESTON. The RESTON version of Paint was copy protected !^}by moving the disk directories to different sectors than DOS uses. This means that you could not access your pictures from DO!_}S. F D (fix DOS) copies the RESTON Directory to the DOS directory, making your pictures DOS accessable. F R (Fix Reston) copi!`}es the DOS directory to the Reston Directory so Paint can find them. It is vitally important that the two directories be kept!a} identical at all times.If you have Paint by Reston then use a separate disk, formatted by Paint, for your paint screens. U!b}se a F D at the beginning of your editor session and a F R at the end. Fix always defaults to the input drive.If you do not!c} have Paint by Reston DO NOT USE THIS COMMAND. It is dangerous since it does direct sector I/O. This command should never be !d}included in a program. It always displays a SURE? prompt.G - Graphics.G mode.Identical to issuing a graphics command. !e}The editor supports modes 1-7.e.g.G 7H - help.H [command]The help command displays the general format of all the c!f}ommands, and some hints on the use of some features. You can specify a particular command, or browse through all the commands!g}. Help is most useful when you know how to use the editor, but have not used it for a while. To get help the file SCRNHELP.FI!q}IB'DOS SYSB*+DUP SYSB;UDOC 000B$DOC 001B(DOC 002BDOC 003B.DOC 004B!&DOC 005B<GDOC 006BNDOC 007B DOC 008BADOC 009B!ANTICTL2BASB&CHOPPERHMAPB-SHIP MAPB 2CHAR31 MAPB ;CHAR23 MAPBDSEQ1 PGMBFSEQ2 PGMBHANTIC PGMBNSHIP PGMBQMENU PGMBVTITLE PGMB\SELECT1 PGMB^SELECT2 PGMBbAUTHOR PGMBfRAYGUN SNDBgCASTLE1 SCRBvTURRETA SCRBwTURRETADSCRBxTURRETB SCRByTURRETBDSCRBzTURRETC SCRB{TURRETCDSCRB|CLEAR SCRBFLASH SCR/]5BPgĀĀgĀ g `!!&g"."##x$ $&%%_ '^'(Ug&U)̀(L must be on the disk in drive 1.e.g.HH CH GI - Insert.I P colorI L xloc,ylocI R xloc,ylocI S stringI C strin!r}gI n stringI P or Insert Point will place a point of any color at the current cursor position.I L or Insert Line will dr!s}aw a line in the current color from the current cursor position to the location specified. I R or Insert Rectangle is similar!t}, but uses the current and specified locations as the opposite corners of a rectangle.I S will insert the string into the s!u}creen. Used for inserting text into a graphics 1 or 2 screen, but can be used with the values 0-3 to draw on a graphics 3-7 s!v}creen.I C will insert characters or symbols from the current map into the screen. Used for adding text to a graphics 3-7 sc!w}reen, or symbols of any type. Not very useful in graphics 1-2 unless you are going to use a redefined character set, and the !x}map contains your matrix images. I n, where n is a number, will insert the nth letter from the string. This format is very us!y}eful when creating symbol animations from a program in combination with a user register.In both the I S and I C command lea!z}ding spaces are significant. When used in a program, trailing spaces are too.e.g.I P 2I L 10 10I R 120 20I S HI THERE!{}I C WOMBATS RULE OK!I #0 ABCJ - Jump or Justify.J dir distThe Jump command repositions the screen. Direction can be !|}Up, Down, Right or Left.e.g.J U 10J R 5J L 7J D 20K - Keyboard.K commentWhen the K command is encountered in a !}}program, the editor gets a command from the keyboard. Use a comment to remind yourself what to do.e.g.K insert next chara!~}cterL - Load.L type filenameThe Load command is the main way to read data into the editor. Type can be Compressed, Dra!}wit, Paint, User maps or eXtra long. Load defaults to the Input drive. The extender defaults with the type of file.L X is a!} special form of the L C command, used when working with longer animation screens. It uses the other viewing area as well as !}the normal I/O buffer. This may allow you to test an animation with loops and sound effects, that won't fit into the standard!} 3840 byte buffer. The other viewing area is corrupted, and will contain garbage next time you look at it.e.g.L C CASTLE1!}L D DWARFL P DRAGONL X TEST.SEQL U CHAR21M - MERGE.M filenameThe merge command will copy a file to the current an!}imation file. It is used to combine sections of an animation into longer segments. It defaults to the input drive and compres!}sed extender.You can cheat and use a B A/M/T A sequence to copy a file of any type, since merge does not edit the file.N!} - New.New clears the current screen without resetting the graphics mode or color registers.O - Overlay.O type.Used !}in the creation of overlays. Overlay Fill, fills every PIXEL of background in the current screen, with the corresponding pixe!}l of the other viewing area. Overlay eXtract changes every BYTE that is the same as the other viewing area to background. Ove!}rlay Both does an O F followed by a O X.e.g.O FO XO BP - Printer Toggle.If you have a line printer attached to you!}r system, a P will switch the printer on/off. All the commands entered via program or keyboard will be echoed to the printer.!} This is useful when you are trying to work out a technique for a program, or when trying to find a bug in a program.r can d vQ - Query.Q SQ FQQ xloc yloc [a]The Query Space command shows the free space available. This is very useful when ch%}anging the code. This should never fall below 50 bytes or strange things start happening.The Query File command shows the l%}ast Input, Output and Animation files. This is useful when converting lots of files and you forget where you are.The other %}forms of the Query command show the cursor position, and position the cursor. You can move the cursor with the arrow keys, an%}d do some simple drawing while under the Q command. Press return to accept the new position. This is illustrated in great dep%}th in the tutorial. The presence of any third parameter positions the cursor without pausing. Q always works as if you had a %}third parameter when used in a program. Q is the only command that changes the cursor position.e.g.Q SQ FQQ 10 10Q 10%} 10 AQ 10 10 XR - Run.R filenameRun an editor program. Run defaults to the Input drive and the the Run extender. Prog%}rams may be nested three deep. i.e. You can run a program which runs a program, which also runs a program. Programs are very %}useful any time you have to repeat a sequence of commands. You can stop a running program at any time, by pressing the ESCape%} key.e.g.R TESTR D2:MACRO.001S - Save.S type filenameSave the current screen to disk. Drive defaults to the Outp%}ut drive and extender defaults based on the type of file. Type may be Compressed, Drawit, Overlay, Paint or User map.A comp%}ressed screen contains 3 SCRLD commands: Graphics, Load 9 regs and Load Screen. An overlay screen is a compressed screen with%}out the graphics command.Only Graphics 7 screens may be saved in Paint or Drawit formats.The setting of the Window contro%}ls whether or not a saved screen will have a text window when it loads.T - Terminate.T typeThe terminate command ends %}a Build Macro or Build Animate sequence. Type may be Macro or Animate.e.g.T MT AU - User Registers.U noThe User c%}ommand allows you to see the current values of the user registers. U or U 0-4 views the first 5 registers, U 5-9 views the se%}cond 5 registers.e.g.UU 2U 5V - View.V [0 or 1]The view command changes the current viewing area. A V on its ow%}n toggles between the two areas. V 0 or V 1 may be specified if you wish.W - Window.W [action]W on its own turns the t%}ext window on or off. W Y or W N are more useful in a program. W P or Window Pause turns off the editor text window so you ca%}n view the whole screen. W C or Window Clear removes any screen data currently under the text window.e.g.WW YW PW C%}X - Delete FileX filenameX - cross out. The X command deletes files. Wild cards may be used, just like in DOS. The X comm%}and defaults to the Input drive. Extenders do not default.e.g.X TEST.SCRX D2:WORK.FILX TEST.*Y - Exit to DOS.Y, W%}hy not? It was the only letter I had left!Z - Zoom.Z HZ type sectionZoom Half changes a four color screen to its two %}color equivalent. Graphics 7 goes to 6, graphics 5 goes to 4. Colors 0 and 2 become color 0, colors 1 and 3 become color 1.%}Zoom Up or Zoom Down convert between the graphics modes. Section is the origin or destination section as follows.1 upper le%}ft corner2 upper right corner3 lower left corner4 lower right cornerThe Zoom command allows you to use Paint or Drawit t%}o prepare screens for viewing in graphics modes 3-6.e.g.Z HZ D 1Z U 2The Numeric Commands.The numeric commands ar%}e used withing A B A/T A sequence to write individual SCRLD commands to a compressed file. These commands do not change the s%}creen in the editor, they take effect when the compressed screen is loaded. Please consult the SCRLD routine for a full descr%}iption of the format of these commands on the file.0 - GraphicsThis command writes the current graphics mode/window setti%}ng to the file.e.g.01 - Load 9 Registers.This command writes a load 9 register command and the registers to the file%}.e.g.12 - Load 5 Registers.This command writes a load 5 register command and the registers to the file.e.g.2%}3 - Write current screen.This command writes a load screen command and the compressed screen data to the file. Prior to thi%}s release of Dragons Tail, the compressed screen command on file was a 3, now it is a 15. In the worst case a 15 format scree%}n may be 2 bytes longer than a 3 format screen, but when working with overlays, the 15 format is likely to by 20-50 bytes sho%}rter. The SCRLD routines recognise both formats, so screens created using the utility on DRAWIT, and the DRAGON QUEST screens%} can still be loaded, but the DRAWIT utility does not recognise the 15 format, and should no longer be used.e.g.34 - L%}oop.This command writes a loop command to the file. A single loop can repeat up to 255 times and loops can be nested 10 dee%}p.e.g.4 105 - End Loop.This writes an end loop command to the file. The SCRLD commands between the last loop and the%} end loop will be repeated the number of times specified on the loop command.e.g.56 - Wait Jiffies.This command tell%}s SCRLD to wait for n jiffies (1/60 sec).e.g.6 107 - Wait Seconds.This command tells SCRLD to wait for n seconds.%}e.g.7 38 - Sound.This command tells SCRLD to issue a sound command. Its parameters are exactly the same as a Basic SOU%}ND command.e.g.8 0 80 10 49 - Direct Output.This screen editor command is a direct write to the file. It can have an%}y number of parameters. If the parameter is greater than 255 it writes a word (low byte/high byte) to the file. If the parame%}ter is less than 256 it writes a byte to the file. This command is used to set up the advanced animation commands of SCRLD (9%}-14), which are not directly supported by the editor. It could also be used to write any other commands but why would you wan%}t to do so. The 9 editor command is extremely rarely used and only the more advanced programmers are likely to use it. I have%} yet to use a 9 command, other than to test that it worked.e.g.9 9 764 2559 14 1664The User Registers.#n OP valT%}here are 10 user registers that can be used instead of any numeric, or character field. These user registers support 5 arithm%}etic operators, =, +, -, *, and /.#1 + 3#0 * 2The registers support 4 logical operators, E (equal), N (not equal), > and%} <. The editor will execute all the commands between a logical statement and a *E if the logical command is true. Logical com%}mands can be nested, but they all end at the first *E.#1 E 2J D 4*E#2 > 35#3 = 1Q 20 20*EIn the second example abo%}ve, Q 20 20 will only be executed if #2 is greater than 35 AND #3 is equal to 1.To use the numeric value of a register in a%} command, insert #n.J D #1Q #0 #1I #2 STRINGTo use the character value of a register in a command, insert @n. This is s%}imilar to the CHR$ Basic function. i.e. If #1 contains 65, then @1 is an A. CHR$(65) is an A.I S @2I C @1J @1 #2L C @2%}The registers support fractions, but there integer value is used in commands where integers are required.#1 + 0.5#2 * 1.1%}Final Hints.Try not to confuse the arithmetic operator =, with the logical operator E.In addition to the comment * sta%}tement, you can put a comment on any line, where there is no chance the editor will think it is part of the instruction.e.g%}.J D 20 Jump down 20.B M TEST Build a work macro.O F Fill in Background.C 3 9 4 Text window is Blue.are al%}l valid butC 1 Draw in color 1is not. This is because the C command has two formats, one of which has 3 parameters.%} The editor thinks you have entered the second format, and that the comment is actually a parameter.As a general rule, do n%}ot use end-of-line comments on the A, C, D, E, I, Q, U, V, W or Z commands.When designing your programs use the buffers as %}much as possible, and try to avoid comparativly slow disk I/O commands. The L B command is much faster then a L C command, wh%}ich can be very significant in long sequences.Some Animation Techniques.The easiest form of animation to understand, is%} Hand Drawn Animation. This is where you draw each frame of a sequence as a separate screen, and use the editor to combine th%}em. A very simple program will combine the pictures, something like:K Load next frameO X36 6O FVwill work nicely. Af%}ter you have started the animation and saved to first screen, View the other area and Run this program, for the number of scr%}eens in the animation minus 1. This form of animation produces the overall best effects but takes the longest to do, since ea%}ch screen must be drawn.The type of animation that takes the least work is User Map animation, where you draw just the back%}ground and use maps to insert the moving images. This type of animation tends to look like player missile animation, but you %}can move much larger images, and you don't need to be an expert assembler programmer to use it. In User Map animation almost %}all the work can be done by programs, but the programs tend to be longer and more complicated.Using map animation on a char%}acter screen, with redefined character sets is an extremely powerful although complicated technique. This form of animation w%}ill produce extremely long sequences with comparativly short files. To set up and successfully execute this technique may tak%}e months but the end effect is likely to be stunning.As a general rule, design your animations as if you were making a movi%}e. Lay out story boards, plan your "camera" angles and plan your pauses. Build your animations in short 20-30 second sections%} or "scenes" and combine them into longer sections with the merge command. free space available. This is very useful when ch$K4.5 MAPPER.BAS - Build Maps and Symbol Tables.The mapper program will convert between maps used by the editor, and symbo)}l tables prepared using a word processor. The file names will default to D1: and the extenders to .MAP or .SYM depending on t)}he type of file. The mapper program edits your symbol tables and will output an error message if it finds anything it doesn't)} like. A FORMAT error means that your symbols are not all the same size. A SIZE error means that your symbol table is longer )}than the 1050 bytes that the editor can handle.4.6 DEMO.BAS - A demo of the SCRLD routine.This program loads a 2 minute)} long animation sequence which was originally intended to be the menu for this disk. Common sense prevailed and I realised yo)}u probably didn't want such a long menu, so I included it as a demo. The menu selections will still work as shown except that)} BUFFER and BUILDER are now on volume 1 of the library.This animation is used as an example in the tutorial so you will wan)}t to view it a couple of times. This sequence was built by the EDITOR almost entirely by EDITOR programs, and all these prog)}rams, screens and maps are included on the disk. You can rebuild this sequence from the original programs if you want. It tak)}es about 90 minutes to build. and Symbol Tables.The mapper program will convert between maps used by the editor, and symbo(5. Possible Modifications to the EDITOR.Since you can get at the source code of the EDITOR, you can modify it if you want. -}If you choose to do so there are a few things you should know. The editor is out of space, it is full, only 30 or so bytes -}remain for inserting any last minute fixes. This program contains every trick I know to reduce program size. The editor uses -}120+ variable names and you are only allowed 128. Do not have any grandios schemes of adding any major features, they are not-} going to fit.However, there is one change that you might consider. If you do not have Paint by Reston the Fix command is n-}ot only useless, it is posatively dangerous. Delete the code supporting the fix command (2900-2960) and type a space over the-} F in the CMD$="......" statement (9210). Do not delete the F, this table is positional. Then run the program and do a Q S. S-}ubtract 60 from the number it returns and add this number to the length of CT$ (9110). This will allow you to use longer user-} maps. Do not forget to change the Mapper program to allow the new length.You could do the same with the A comand if you ab-}solutely posatively never intend to change the default extenders. If you have one drawing program and you NEVER intend to get-} another, then you could remove its support code. In all cases just add the bytes you free up onto the user map buffer CT$ an-}d change MAPPER to handle the new size. Never have less than 50 bytes of free space or you will run into strange and inexplic-}able problems. I think parts of Basic and maybe parts of the operating system assume that there will always be some free spac-}e, and use it as a work area. This is just a guess on my part, the problems that arise are wierd.In your programs that disp-}lay the screens you will only use one of the SCRLD routines. If you intend to work in graphics modes that are not supported b-}y the editor, like graphics 8, or Antic Mode 4, then use the other routines to write your own utilities.6. MAC65 Source C-}ode Available.If anyone is interested in how the routines work, send me $14.99 to cover postage, packaging and profit and I-} will send you a copy of the MAC65 source code and macro libraries. This includes all the routines on these disks, and one or-} two that didn't make it.These macro libraries were written specifically to support combining 6502 assembler with Basic pro-}grams, and have many special features to that end. They produce extremely complicated, but very compact object code, but are -}remarkably simple to use. The MAC65 source code written using these libraries looks a lot like a high level language, and is -}very easy to follow. A relative beginner could quickly use these libraries to write their own routines, and they could easily-} by added to BUILDER and combined with other library modules.The macros themselves are extremely complicated and very hard -}to follow. They were written to produce compact, efficent, powerful code, rather than to serve as programming examples. You w-}ould need to be an expert programmer to hope to understand what the macros are actually doing, I have trouble following them -}myself. The object code they produce is relatively easy to follow, and the source code is a snap. They have been heavily test-}ed, and are fully documented so they are very easy to use. The macro libraries themselves took me over 8 months to write and.} debug, but none of the routines that use the macros took over an evening to develop.I make this distinction so no one will.} buy this package and be dissappointed. If you want to learn and understand macro writing, then the MAC65 Toolkit by OSS is a.} good choice. My macros will drive you scatty. If you want to write easy to read, efficient routines, that can be quickly dev.}eloped and tested, and combined with Basic, then this package is an excellent choice.7. ERRATA (The muse of programmers)..}All programs contain bugs! This is an established fact. I just want to mention three bugs you should watch out for here.T.}he first is a bug in DOS 2.0S, which may also be in other versions of DOS. If you open a file for update (OPEN #1,12,0,"D:MYF.}ILE") then do a POINT and then write a block of data that crosses a sector boundary, either via PBYTE or Basic PUT statements.}, then DOS garbles the sector chaining pointers on the sector after the one you started writing on. When you try to access th.}at file you get error 164. Your file is lost. This is an extremely nasty error which I don't think has been previosly documen. }ted.The second is a bug in BASIC. Basic does not handle powers correctly. For instance, version C Basic thinks that 3^2 (3 . }squared) is 10. This bug varies from version to version of Basic. HEXCALC has a correction factor build into it that makes it. } work correctly but I do not know if this will correct the problem on BASIC A or BASIC B. You might like to check it out befo. }re you use HEXCALC to do your Maths Homework.The third problem is a bug in the TAIL routines. (AAAGGGH!!! Yes, I make mista. }kes too!) Under certain circumstances the TAIL routines may not recognise the first string you dimension as being a string. T.}he result varies depending on which routine you call, usually you get a string error. The easiest way to avoid this error is .}to GOSUB the loader routines before you DIMension your strings. Another easy way is to dimension any array you are using or a.}ny string that wont be used with the TAIL routines first. The third way is to make sure that your first string is also the fi.}rst variable used in the program.Since I know about this bug, you may wonder why I don't fix it. To do so I would have to m.}ake the AUTORUN.SYS file about 120 bytes longer. Then it wouldn't end on a 2K boundary, and if you needed a boundary aligned .}buffer, you would end up wasting up to 2K of memory. Since the bug is so easy to avoid, I decided to leave it alone, and admi.}t to my mistake. By the way, do you know the origin of the term program bug. When they were testing one of the first.} computers, they couldn't get it to work properly. After careful checking the engineers found a dead moth in one of the circu.}its. They removed it and everything worked. They joked that they had debugged the computer, and the term stuck. The original .}kamakazi moth is preserved in a museum somewhere, the Smithsonian I think.8. Parting Words.Well the Dragons Tail Disks .}are now complete. I certainly hope you have a lot of fun with them. Some of the techniques involved are a little complicated,.} but I know you will soon get used to them. If you come up with something your really proud of, by all means send me a copy. .}I would be really interested to see what someone with some artistic or musical talent can do with the EDITOR. I have never be.}en much good at either myself. If I get a good reader response I will try to put out a disk containing the best animations, A.}NTIC willing.I would like to thank Charles Cherry of Antic, for his guidance in packaging these disks. Charles Jackson and .}Patrick Bass of Antic for there help with the file formats of various drawing packages. Lastly I would like to thank Jim Hass.}el of Fairbanks, Alaska whose letters on Dragon Quest encouraged me to try and package these routines.If you have any comme.}nts, routines you want to see, changes you would like, or just questions, then please contact me. There is a possibility of t. }hird and fourth Dragons Tail volumes but it is really up to you. Let me know what you would like to see. If the demand is the.}0 FE ##CONVERT ATARIWRITER+ TO ANTICd;@,;@,n2"}6.D1:TAIL2DOC.000x-@@ 6.=:,6-@&B:,-67@<@,.1-67<@,.2 2#}@@2( CONVERTING 67@<@,.2* @@* A3)@2$}@)*@3 A?6-@*@(6-@ 5*@? A@@2%} D1:ANTICTL2.BAS ##CONVERT ATARIWRITER+ TO ANTICd;@,;@,n0&<AB3333311111111133333333333333333333333333333111133333111111111111311111111132223222323332223222322232223111111113111111116'}113333311113113233323332333233323333233332311111133333111131113113333331113222322332333223323333233323311111131133333311133336(}333331111333232333233323332333323333331111133333333311113333333111111322232223222322232223323332331111133333331111111311311336)}333333333333333333333333333333333333331311311111111111333331111133333333333333333333333333333111111113333311111111311111111136*}222322232333222322232223222311111111311111111113333311131113233323332333233323333233332311111133333111311113113333331113222326+}233233322332333323332331111113113333331113333333331111333232333233323332333323333331111133333333311113333333111111322232223226,}232223222332333233111113333333111111131131133333333333333333333333333333333333333331311311111113222322232223111111113111111114_ ABC11111111111111111111333331111111133333333311113333333333333133333333333333331311311311311333333333333333333333333333333:.}30333333333333300003322222330000000020202000000000000200000001111111111111111111133333111111113333333331111333333333333313333:/}33333333333331131131131133333333333333333333333333333333033333333333330000332222233000000000222000000000000202000000111111111:0}11111111111333331111111133333333311113333333333333133333333333333331131131131131333333333333333333333333333333303333333333333:1}000033222223300000000222220000000000202020000033111133333333333331333333333333333313113113113113333333333333333333333333333338.A @ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!"#$%&'()<>-_=|+\*^,.[]/?;:111111111111111111111111111111333313313333313331313331313>3}33133331131131133333131331331333133331133131133333331133131131133331131131333331331333331331333313113113133311311311331333331>4}33133313133133113113113113333133333133133133333133133133133333133133133333313133313113113333133133113333313133313133133333113>5}33113333333131131131131313313313313333313313313313131313313313333313313313131313313313313131131131333113131311333131131131131>6}13133111313131133333311333311333331131131133313133331133111333131131133331333333311313131131133331333331333333331333311311313>7}13133133131311311311311111313133131111111113133333133333133133113131133133111131313111131313131313131331311311111111111313113>8}11311131131113113113131113131311131113311131113131311111111333111111111111111111333111333111333111131131131131131111131333131>9}11111131113111311131313133313131311113131331311111111111113113111111111113313333131131131133113311311311313311111313131111133>:}3113131111131111131111131131111131111131111#$%&'()<>-_=|+\*^,.[]/?;:111111111111111111111111111111333313313333313331313331313<+) @ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-.?333333333333333333333333333333333333333333333333333332223232323232223232333332233B<}23232233232322333333222323332333233322233333223323232323232322333333222323332233233322233333222323332233233323333333222323332B=}33323232223333323232323222323232323333322233233323332332223333333233323332323232223333323232323223323232323333323332333233323B>}33222333332323222323232323232333332223232323232323232333332223232323232323222333332233232322332333233333332223232323232333222B?}33333223323232233232323233333222323332223332322233333222332333233323332333333232323232323232322233333232323232323232332333333B@}23232323232322232323333323232323323323232323333323232323323332333233333322233323323323332223333332333233323332333233333322333BA}32332332333222333332223332322233323222333332333233323332223323333332223233322333323223333332333233322232323222333332223332332BB}33233323333333222323232223232322233333222323232223332333233333323323232323232332333333333333332223333333333333333333333333223BC}3223333332223332332333333323XYZ1234567890-.?333333333333333333333333333333333333333333333333333332223232323232223232333332233@B A SEQ1M CASTLE17 2M LANDING7 1M TURRET6 30M ANTIC6 30M TURRETD6 30M TURRETB6 30M CLEAR6 30M TURRETBD6 30M FE}TURRET6 30M TITLE6 30M TURRETD6 30M TURRETC6 30M AUTHOR6 30M TURRETCD TURRETB6 30M CLEAR6 30M TURRETBD6 30M DPB A SEQ26 30M TURRETB6 30M CLEAR6 30M TURRETBD7 1M MENU7 18 0 198 2 68 1 198 6 68 2 22 4 26 30M SELECT1M SELECJG}T28 0 0 0 08 1 0 0 08 2 0 0 0T A6 30M TURRETBD7 1M MENU7 18 0 198 2 68 1 198 6 68 2 22 4 26 30M SELECT1M SELECH%* ANTIC* MAGAZINE.* THE ATARI* RESOURCE.** BUILD WORK MACROS*B M W1 FLASH IN CHARACTERQ #0 #1#3 E 1I #2 ANTIC*ENI}#3 E 2I #2 MAGAZINE,*E#3 E 3I #2 THEATARI*E#3 E 4I #2 RESOURCE.*E#2 + 1#0 + 1#1 + 5Q #0 #1C 2I L 27 42O X3M NJ}RAYGUN.SNDO FVL BC 1I L 27 42#0 + 3#1 - 5T M*B M W2 PAUSE BETWEEN LINES#2 = 1#1 + 6#3 + 1O X36 30O FVL BTNK} M** INITIAL SET UP*L U CHAR31L C CASTLE1VL BB A ANTICM TURRETA6 30*#2 = 1 CHARACTER#3 = 1 WORD#0 = 12 COLNL}UMN#1 = 8 ROWR W1 5R W2#0 = 12R W1 9R W2#0 = 16R W1 3#0 + 4R W1 5#0 = 16R W2R W1 9R W2M TURRETAD6 30TX W1NM}.PGMX W2.PGML C CASTLEL X ANTICESOURCE.** BUILD WORK MACROS*B M W1 FLASH IN CHARACTERQ #0 #1#3 E 1I #2 ANTIC*EL#* LANDING SEQUENCE* WITHOUT LANDING GEAR* WHICH WAS CREATED BY HAND*B M W1 ONE LANDING CYCLEVNI C @3J D #0W CO B3RO}6 #1O F#0 + 1#1 + #2#3 + 1#3 > 67#3 = 65*ET M* INITIAL SEQUENCEL U SHIPL C CASTLE1Q 20 84#0 = 1 STARTING JUMPRP}#1 = 5 STARTING DELAY#2 = 0.2 TIMER INCREMENT#3 = 65 ASCI "A"B A SHIPR W1 58T AX W1.PGML C CASTLE1L X SHIPO B3Pw* MENU** BUILD WORK MACROS*B M W1 FLASH IN CHARACTERQ #0 #1#3 E 1I #2 1-EDITOR*E#3 E 2I #2 2-MAPPER*E#3 E 3I #VR}2 3-BUILDER*E#3 E 4I #2 4-BUFFER*E#2 + 1#0 + 1#1 + 5Q #0 #1C 2I L 27 42O X3M RAYGUN.SNDO FVL BC 1I L 27 42VS}#0 + 3#1 - 5T M*B M W2 PAUSE BETWEEN LINES#2 = 1#1 + 6#3 + 1#0 = 16O X36 30O FVL BT M** INITIAL SET UP*L UVT} CHAR31L C CASTLE1VL BB A MENUM TURRETA6 30*#2 = 1 CHARACTER#3 = 1 WORD#0 = 16 COLUMN#1 = 8 ROWR W1 8R W2VU}R W1 8R W2R W1 9R W2R W1 8R W2M TURRETAD6 30TX W1.PGMX W2.PGML C CASTLE1L X MENUE 2I #2 2-MAPPER*E#3 E 3I #T^* DRAGONS TAIL.* VOLUME 2.* GRAPHICS** BUILD WORK MACROS*B M W1 ZAP IN CHARACTERQ #0 #1#3 E 1I #2 DRAGONS TAIL.ZW}*E#3 E 2I #2 VOLUME TWO. *E#3 E 3I #2 GRAPHICS. *E#2 + 1#1 + 6C 3Q #0 #1#0 + 3I L #0 #1#1 + 1#0 - 2Q #0 ZX}#1C 2I L 27 42O X3M RAYGUN.SNDO FVL BC 1I L 27 42#0 + 3#1 - 7T M*B M W2 PAUSE BETWEEN LINESO X36 30O FZY}VL B#0 = 8#1 + 6#3 + 1#2 = 1T M** INITIAL SET UP*#0 = 8 COLUMN#1 = 8 ROW#2 = 1 CHARACTER#3 = 1 LINEL U CHAR23LZZ} C CASTLE1VL B** BUILD FILE*B A TITLEM TURRETA6 30R W1 14R W2R W1 14R W2R W1 14R W2M TURRETAD6 30T AX W1.PGZ[}MX W2.PGML C CASTLE1L X TITLEPHICS** BUILD WORK MACROS*B M W1 ZAP IN CHARACTERQ #0 #1#3 E 1I #2 DRAGONS TAIL.X!* LEFT MOVEMENT OF* SELECT AND CHOPPERS*B M W1Q #0 1VNI C AZ D 1Z U 2O B36 3O FVNI C BZ D 1Z U 2O B36 3^]}O F#0 - 1T M*#0 = 79L C CASTLE1L U CHOPPERHVL BB A SELECT1R W1 77T AX W1.PGMVL X SELECT1Z D 1Z U 2O B36 3\g* CHOPPER DECENT*B M W1VJ D 136 3T M*B M W2J U 1W C36 3VT M*B M W3J U 1W C36 6T M**L C CASTLE1L U Cb_}HOPPERHNQ 80 0C 1I R 143 7Q 83 1I C AVL BI C BO XB A SELECT2R W1 10VQ 91 12I L 96 12Q 126 12I L 130 12Q 96 b`}6C 0I R 127 11Q 80 5I L 143 536 3V36 3VQ 96 12I L 127 12C 1Q 80 13I L 95 13Q 128 13I L 144 13R W2 16R W3 5ba}T AX W1.PGMX W2.PGMX W3.PGML C CASTLEL X SELECT1L X SELECT23VT M*B M W3J U 1W C36 6T M**L C CASTLE1L U C`C* AUTHOR*B M W1Q #0 #1#3 E 1I #2 BY *E#3 E 2I #2 ED CHURNSIDE *E#3 E 3I #2 C. 1986. *E#2 + 1#1 + 6Q #0 #1Ifc} S 3333#0 + 4#1 - 6Q #0 #1M FLASH36 8NT M*#0 = 8#1 = 63#2 = 1#3 = 1L U CHAR23L C CASTLE1NB A AUTHORM TURRETfd}CR W1 46 30#1 + 7#2 = 1#3 + 1#0 = 8R W1 146 30#1 + 7#2 = 1#3 + 1#0 = 28R W1 96 30M TURRETCDT AX W1.PGML C Cfe}ASTLE1L X AUTHORQ #0 #1#3 E 1I #2 BY *E#3 E 2I #2 ED CHURNSIDE *E#3 E 3I #2 C. 1986. *E#2 + 1#1 + 6Q #0 #1Id   #0 #1#3 E 1I #2 BY *E#3 E 2I #2 ED CHURNSIDE *E#3 E 3I #2 C. 1986. *E#2 + 1#1 + 6Q #0 #1IhFUUW'U_&U&U%UWUUWUU_UU_UUzWUUUUzz^UUzWUU]UUzz^UUnh}U^gfUUzU UU]UUzU UU^gfUUUUU]UU_ꪪU_ꯪUU^ffUUWUU]Uni}zUU^ffUzUUWUzUWꯪUWUUWUWUꪪUWUWUꪪUWUWnj}UUꪪUWU_UꪪUWUyUꪪUWUUꪪUꪪUzUz ꪪUz nk}Uz UWUUQUWUU@UWUUUWUUUWUU Unl}@UWUUUTUUUUUUUU PAPUUUT @꺪UU@@UPnm} UUQPUP  @UTqPU@꺪3$ U0PU]\\5s5꺪nn}3 0  3  P3 T3 UU@3no}UP3U3UU@3UT3UUUT3E@U3Unp}UU3T UTȨ3 P UT?}@N"@6-@X? A$6-?:<<%@`<,?6-?:<<A<@ ,b3-,6-?:<<>}%<%A($,0 3$SAVE SCREEN TO DISK'6-Av"@#'6-A8@-6-?:<<<,-6-?:<A<<@>} ,< +'0@@@9@@<(>,($CONVERT 08/14/86 (C) 1986>@@>} ( ( (ŠΠϠˠ(  6.SCR A** A*@@4GRAPH>}ICS COMMAND>)()(ŠӠĠٯΩH 6.YN6-?:<,R@A"\#6-@x# @>}A!pf$($(נԠנٯΩp6-?:<,z6-*@# 6-"@#6-&@>}*@ COLORS( (ŠҠӠٯΩ6-?:<,"@xA#((ŠҠ>}ӿ 6.596-?:<,U"@S6-@(*@K6-?:<@<%@<@,U A#76-@>}*@76-?:<@<<@ , SCREEN A 6-?:<<A<@ , 6-?:<<<,$ 6-?:>}<@<<A0,. @$(# INIT2# B<#GG;A0,;Av,;@,;@ ,;@,;@>} ,F#0 6-C:,6-C:,6-C:,'6-C:,06-C:,P#$ N DT1*Ng6-A#;,6-C:,+6-Aa;6. D:DT1.>}OBJJ6-?:<<<,gF:A,@B 4N6-%@6-%A-6-%AC;6-%ApI6-%A`W6->}%Ae6-%As6-%A6-%A>Ns6-%A&6-%A@-6-%AF;6-%ARI6-%A8>}W6-%Are6-%Axs6-%A"6R DT2R[6-A;,6-C:,/6. D1:GF.OBJ>6-?:<<<,[F:A,>}@B Rk 6-6-%@t%6-%AW36-%AA6-%AbO6-%A8]6-%Ak6-%Ax>}S DT3T\6-As;,6-C:,06. D1:GF2.OBJ?6-?:<<<,\F:A,@B T 6-6-%@W$>}U ERRORU(( ĠҠV B  D:CONVERT.BASSECBUPSECPADLMOVSAPBYTSCRBBUFSAVCDT1QLOAQ<Egak haliamg  ,*lonqj'ospt2qurvCRvt xusyoszw {1xv|ov}zT*{y*|y*}y*~y~y*y o oTy0Sm*T** oT:&  oRT&=0SmO{wB@DDwABGDgCBDABBD\*p#) COD BDBD{BDB%kB(O?OO %x`0 3 h ABDqCA D $DDB"DB#DQB$D#oBpBC#qBKrB"DBDCBD3BDCC1DX A DBCD1BDBD2^fed%c2a%`%, MM# B=D%]1~DBD BC3D*BDC6D| 0| 0~X$-D*0 !  wO |&6+0 +; o +"N9A.Gi+O !f "##!$>+%R#&-0C!%(-#" )=!*`%$ +?#,a'& -A%.b)( /C'0c+* 1E)2d-, 3H+4e/. 5J-6f10 7L/8g32 9N1:h54 ;P3<i76 =5>q98 ?C7=Cs;: A9Bt< C;v"E@+F$GB+H&ID+J(KI+L*M)NOW,PK+Q.RM+S0TO+U2VQ+W4X+YS#rTR[US\VS]WS^XS_YS`ZSa[Sb\Sc]Sd^Se_Sf`SgaShbSicSjdSkeSlfSmgSnhSoiSpjSqkSrlSsmStnSuoSvpSwqSxSysRztr{ur|vr}wr~xryrzr{r|r}r~rrrrrrrrRR|%fghiZ ~ * .(   $ CRDSD ,:8s+-+#%{0++ 6 <  /8<++++ +: !$"%#W% &'(DTD+-o/<o12#3'o45C6o7(8o91:=%>?$@A%B:C:D%EFGWHuIJ6BKL M#N! OPPQ2t:FB%DDnB#BB.BTlBU5-t#DAD8MjBC7DDB;DAD  5   5 P 55. r  % #pq t# js uv.w`x!y"z#{$"|"}